<?php
	// Setup our default assets to load.
	Assets::add_js( array(
		base_url() .'assets/js/jquery-1.7.1.min.js',
	));
	$cookie = unserialize($this->input->cookie($this->config->item('sess_cookie_name')));
	$logged_in = isset($cookie['logged_in']);
	unset($cookie);
?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />

	<title><?php if(isset($meta_title)) { echo $meta_title; } else { echo config_item('site.title'); } ?></title>

	<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">

	<?php echo Assets::css('style.css'); ?>

	<?php echo Assets::external_js('head.min.js'); ?>
</head>
<body>
	<div id="wrapper">
		<div id="page">
			<a href="<?php echo site_url(); ?>"><div id="header"></div></a>
			<div id="nav">
				<h4>
					<ul>
						<?php if(!$logged_in){ ?>
							<li><a href="login">Login</a></li>
						<?php } else { ?>
							<li><a href="<?php echo site_url('profile'); ?>">My Progress</a></li>
							<li><a href="#">Achievements</a></li>
							<li><a href="#">Items</a></li>
							<li><a href="#">Leaderboards</a></li>
							<li><a href="http://www.fanshawemultimedia.com/mediawiki/index.php?title=Main_Page" target="_new">Wiki</a></li>
							<li><a href="http://www.fanshawemultimedia.com/forum" target="_new">Forum</a></li>
						<?php } ?>
					</ul>
				</h4>
			</div>
			
			
				<?php echo Template::message(); ?>
			 	<?php echo isset($content) ? $content : Template::yield(); ?>
			
		</div>
	</div>	<!-- /page -->

	<div class="foot">
		<div id="footer">
		    <p>&copy; Fanshawe College 2011</p>
		</div>
	</div>

	<div id="debug"></div>

	<script>
		head.js(<?php echo Assets::external_js(null, true) ?>);
		head.js(<?php echo Assets::module_js(true) ?>);
	</script>
	<?php echo Assets::inline_js(); ?>
</body>
</html>
